<template>
	<view>
		<!-- <view class="header">
			<view class="headerLeft">
				<image class="backImg" src="../../static/icons/lx/icon_statusbar_back2x.png" mode="" @tap="back">
				</image>
				<text class="headerText">消息</text>
			</view>
		</view> -->
		<view class="setList">
			<view class="setItem" v-for="item in setList" :key="item.name">
				<view class="textArea">
					<text class="nameText">{{item.name}}</text>
					<text class="nameInfo">{{item.info}}</text>
				</view>
				<switch color="#f5610c" class="switchBtn" style="transform:scale(0.8)" checked="item.checked"
					@change="changeButton" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				setList: [{
						name: "优惠活动",
						info: '优惠活动推送',
						checked: true
					},
					{
						name: "互动消息",
						info: '车友圈收到的信息',
						checked: true
					},
					{
						name: "系统消息",
						info: '平台推荐的消息帮您更好的体验',
						checked: true
					},
					{
						name: "订单物流",
						info: '像您发送您的订单详细信息',
						checked: true
					},
					{
						name: "个人助手",
						info: '每日为您推荐精彩的文章',
						checked: true
					}

				]
			}
		},
		methods: {
			// 返回上一页

			changeButton(e) {
				console.log(e);
			}
		}
	}
</script>

<style>
	.header {
		display: flex;
		align-items: center;
		margin-bottom: 2rpx;
		overflow: hidden;
		width: 750rpx;
		height: 88rpx;
		background-color: #ffffff;
		border-bottom: ;
	}

	.headerLeft {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-left: 24rpx;
		margin-top: 16rpx;
		width: 346rpx;
		height: 56rpx;
	}

	.backImg {
		height: 56rpx;
		width: 44rpx;
	}

	.headerText {
		height: 56rpx;
		font-family: PingFang SC;
		font-size: 40rpx;
		line-height: 56rpx;
		color: #232323;
	}

	/* 设置每项的样式 */
	.setList {
		background-color: #fff;
	}

	.setItem {
		height: 88rpx;
		display: flex;
		justify-content: space-between;
		padding: 0 40rpx;
	}

	.textArea {
		height: 88rpx;
		line-height: 88rpx;
	}

	.nameText {
		margin-right: 20rpx;
		font-family: PingFang SC;
		font-size: 28rpx;
		line-height: 44rpx;
		letter-spacing: -1rpx;
		color: #000000;
	}

	.nameInfo {
		font-family: PingFang SC;
		font-size: 20rpx;
		line-height: 44rpx;
		color: #979797;
	}
</style>
